Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
Cómo usar "archivo readProperties:" en jenkins

Así que estoy usando una versión muy antigua de svn (1.6.23_32) y jenkins.

Estoy tratando de ejecutar lo siguiente en mi Jenkinsfile-

 def p = readProperties file: 'versions.properties' def SVN_TAG="ccsmp_v_${p.version.major}.${p.version.minor}.${p.version.maintenance}.${p.version.build}"

Pero recibo el siguiente error:

 java.lang.NoSuchMethodError: No such DSL method 'readProperties' found among [ansiColor, archive, bat, build, catchError, checkout, deleteDir, dir, echo, emailext, emailextrecipients, error, fileExists, git, input, isUnix, load, mail, node, parallel, properties, publishHTML, pwd, readFile, retry, sh, slackSend, sleep, sshagent, stage, stash, step, svn, timeout, timestamps, tool, unarchive, unstash, waitUntil, withEnv, wrap, writeFile, ws]

"versions.properties" tiene los siguientes contenidos-

 #ccsmp build version information #Tue, 12 Apr 2022 15:32:37 -0400 branch.type=feature cscsmp.svn.branch=branches/features/javarto_maven ivy.cache.dir.name=${svn.branch} jrto.version=${jrto.version.major}.${jrto.version.minor}.${jrto.version.maintenance} jrto.version.build=26856 jrto.version.maintenance=0 jrto.version.major=0 jrto.version.minor=0 lib.version=1.5 openvms_pass=xyz openvms_server=xyz openvms_user=loadxyz svn.branch=branches/features/CRE-442 svn.branchurl=${svn.rooturl}/${svn.branch} svn.password=xyz svn.rooturl=svn\://xyz-repo/svn/ccsmp svn.tagurl=${svn.rooturl}/tags svn.username=xyz version.build=846 version.date=2022/04/12 15\:32 version.maintenance=0 version.major=1 version.minor=37 version.release=${version.major}.${version.minor}.${version.maintenance}.${version.build}

¿Hay alguna forma alternativa de hacer esto? Cualquier sugerencia es altamente apreciada

ACTUALIZACIÓN: También probé -

 def p = readFile 'versions.properties' p = new Properties().load( new StringReader(p) ) def SVN_TAG="ccsmp_v_${p.version.major}..."

Pero esto tampoco funcionó y dio el siguiente error:

 java.lang.NullPointerException: Cannot get property 'version' on null object
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!